<?php


namespace app\index\controller;


use app\common\controller\Article;
use app\common\controller\Message;
use think\Request;


class MyRequest
{
    public function getDetails($articleId){
//        $request = new Request();
        $article = new Article();
        return $article->selectArticleFromId($articleId)['article_content'];
    }

    public function pushMessage(){
        $request = new Request();
        $message = new Message();
        return $message->insertMessage(
            $request->post('msg_author'),
            $request->post('msg_content'),
            $request->post('msg_author_email')
        );
    }

}